Drupal 6.14 with Sections 6.x-1.2 multiple XSS

Է:

@Sebug.net   dis
վṩ()ܴй,ȫоѧ֮,Ը!1.-----BEGIN PGP SIGNED MESSAGE-----2.Hash: SHA13. 4.The text of this announcment is also available at5.http://www.madirish.net/?article=4406. 7.Description of Vulnerability:8.- - - -----------------------------9.Drupal (http://drupal.org) is a robust content management system (CMS)10.written in PHP and MySQL that provides extensibility through various11.third party modules.  The Sections module12.(http://drupal.org/project/sections) "allows you to create sections13.within your site. Each section has an installed template, theme or style14.attached to it."15. 16.The Sections module contains a cross site scripting vulnerability17.because it does not properly sanitize output of section names before18.display.19. 20.Systems affected:21.- - - -----------------22.Drupal 6.14 with Sections 6.x-1.2 was tested and shown to be vulnerable.23. 24.Impact:25.- - - -------26.XSS vulnerabilities may expose site administrative accounts to27.compromise which could lead to web server process compromise.28. 29.Mitigating factors:30.- - - -------------------31.The Sections module must be installed.  To carry out a Sections based32.XSS proof of concept exploit below the attacker must have 'administer33.sections' permissions.34. 35.Proof of Concept:36.- - ---------------------37.1.  Install Drupal 6.1438.2.  Install Sections 6.x-1.239.3.  Enable the Sections module from Administer -> Site building -> Modules40.4.  Click Administer -> Site building -> Sections41.5.  Click the 'Add section' button42.5.  Enter "<script>alert('xss');</script>" in the 'Name' text area43.6.  Click the 'Add section' button to save the section and observe the44.rendered JavaScript45.7.  Click on the 'Sections' link in the navigation to observe the46.rendered JavaScript47. 48.Technical details:49.- - ------------------------50.The Sections module fails to sanitize the output of the section name51.before display.  Applying the following patch fixes this vulnerability.52. 53.Patch54.- - -------55.Applying the following patch mitigates these threats.56. 57.- --- sections/sections.admin.inc 2008-06-01 08:51:51.000000000 -040058.+++ sections.fixed/sections.admin.inc   2009-11-06 15:43:53.997416137 -050059.@@ -234,6 +234,7 @@ function theme_sections_admin_display_fo60.   foreach (element_children($form['sections']) as $key => $id) {61.     // Don't take form control structures.62.     if (is_array($form['sections'][$id]['name'])) {63.+      $form['sections'][$id]['name']['#value'] =64.filter_xss($form['sections'][$id]['name']['#value']);65.       $form['sections'][$id]['weight']['#attributes']['class'] =66.'sections-order-weight';67.       $rows[] = array(68.         'data' => array(69. 70. 71.Vendor Response72.- ---------------73.Upgrade to the latest version.74.SA-CONTRIB-2009-112 http://drupal.org/node/66140475. 76.- -- 77.Justin C. Klein Keane78.http://www.MadIrish.net79.-----BEGIN PGP SIGNATURE-----80.Version: GnuPG v1.4.10 (GNU/Linux)81.Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/82. 83.iPwEAQECAAYFAkspHlIACgkQkSlsbLsN1gCrwQcAkrdlC1Xp5oRqNE2sAw2oCo6284.RFQkd9v1RoVLQTNdJVlvo/VdLpl18e216CeCd1Is0Uzk8/qegNLplyVF2rgQRnP185.jgcdSqu/gNUx22kWdxlIPuc9AreeuDpzaokyqXQLf0JZdhfjZopg2xaNZJ6ur73D86.wO6RgjOT63/u+lH/gahJmJyvtR32Yc3phnbTcMPbqznxuNID7/9ZlY+SCat2GcOM87.A7fzzAwOX232lnaWuvk8wuolCtgA6VHzFXDjj+TNQvv/FXNkaqimZ8fIVnCfsbWu88.erD9ZccCP4lTpTzd51I=89.=Tpdx90.-----END PGP SIGNATURE-----